﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Lincolnwood.Foundation.Scheduling;

namespace Lincolnwood.Foundation.Scheduling.Tests
{
    [TestClass]
    public class EventFactoryTests
    {
        [TestMethod]
        public void Create_New_CalendarEvent_Succeeds()
        {
            var scheduleID = Guid.NewGuid();
            var eventName = "Test Event Name";
            var eventDesc = "Test Event Description";

            // Jan 1 2010, 0800
            var eventBeginDateTime = new DateTime(2010, 1,1,8,0,0);
            // Jan 1 2010, 1300
            var eventEndDateTime = new DateTime(2010, 1,1,13,0,0);

            RecurrableEventDefinition testCalendarEvent = EventDefinitionFactory.CreateEventDefinition(scheduleID, "Test Event Name", "Test Event Description", eventBeginDateTime, eventEndDateTime);

            Assert.AreEqual(eventName, testCalendarEvent.Name);
            Assert.AreEqual(eventDesc, testCalendarEvent.Description);
            Assert.AreEqual(eventBeginDateTime, testCalendarEvent.StartTime);
            Assert.AreEqual(eventEndDateTime, testCalendarEvent.EndTime);

        }
    }
}

